<!--
 * @Author: your name
 * @Date: 2022-01-06 08:32:12
 * @LastEditTime: 2022-01-13 15:01:16
 * @LastEditors: Please set LastEditors
 * @Description: 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
 * @FilePath: \elementui\src\App.vue
-->
<template>
  <div id="app">
     <!-- 组件{{this.$store.state.num}} -->
     <p>a模块的状态{{this.$store.state.a.num}}</p>
     <p>b模块的状态{{this.$store.state.b.count}}</p>
     <button @click="adda">增加a的状态</button>
     <button @click="addb">增加b的状态</button>
    <div id="nav">
      <router-link to="/home">Home</router-link>
      <router-link to="/about">About</router-link>
      <router-link to="/login">Login</router-link>
      <router-link to="/slot">Slot</router-link>
      <router-link to="/animate">Animate</router-link>
    </div>
    <router-view />
    <ZButton></ZButton>
    <Son></Son>
    <button >增加</button>
  </div>
</template>

<script>
import Son from "./views/Son.vue"
export default {
  name: "App",
  components:{
    Son
  },
  computed:{
    // newnum(){
    //   return this.$store.state.num*10
    // }
  },
  methods:{
    // fnadd(){
    //   // this.$store.commit("increment",20);
    //   this.$store.dispatch("actincrement",20)
    // }
    adda(){
      this.$store.commit("a1fn")
    },
    addb(){
      this.$store.commit("b2fn")
    },
  }

};
</script>
